package com.lianjia.sh.se.esb.server.config;

import com.dooioo.se.lorik.core.annotation.EnableReconfigure;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @author ouyang
 * @since 2015-08-11 10:13
 */
@Configuration
@EnableReconfigure
public class EsbDataSourceConfig {

    @Bean(name = {"esbDateSource"})
    @ConfigurationProperties(prefix = "esb.datasource")
    public DataSource dataSource() {
        return DataSourceBuilder.create().build();
    }

}
